package com.dameng.work.controller;


import com.alibaba.fastjson.JSON;
import com.dameng.work.pojo.T03;
import com.dameng.work.pojo.TCE;
import com.dameng.work.service.T03Service;
import com.dameng.work.service.TCEService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Controller
public class TCEController {
    @Autowired
    private TCEService tCEService;



    @RequestMapping("/findTCEListByDate")
    @ResponseBody
    public String findListByDate(){


        List<TCE> all = tCEService.findAllByDate();
        Map<String, Object> returnMap = new HashMap<>();
        returnMap.put("state","1" );
        returnMap.put("result",all);
        return  JSON.toJSONString(returnMap);

    }

    @RequestMapping("/findTCEListByDate1")
    @ResponseBody
    public String findListByDate1(){


        List<TCE> all = tCEService.findAllByDate1();
        Map<String, Object> returnMap = new HashMap<>();
        returnMap.put("state","1" );
        returnMap.put("result",all);
        return  JSON.toJSONString(returnMap);

    }


}
